package com.cz.consume;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.cz.consume.service.QueryService;

@SpringBootApplication
@RestController
@EnableEurekaClient
@EnableCircuitBreaker
public class Application {
 
	@Autowired
	private QueryService queryService;

	@RequestMapping("/test")
	public String home() {
	   return	queryService.query();
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		new SpringApplicationBuilder(Application.class).web(true).run(args);
	}

}
